var express = require('express');
var router = express.Router();

const {
    login,UserList,signup,Grabble,remove,ModifyUser,ListOne,
    HouseSignup,HouseList,removeHouse,GrabbleHouse,ModifyHouse,
    ListOneHouse,CommentSignup,CommentList,GrabbleComment,
    removeComment,getCPU,ListOneComment,SellList,SellSignup,
    removeSell,GrabbleSell,ListOneSell
    } = require('./controllers');

/* GET users listing. */
//用户列表router
router.get('/UserList',UserList)


//登录router
router.post('/login',login);

//添加用户
router.post('/signup',signup);

//ID查找单个用户
router.put('/ListOne',ListOne);

//修改用户
router.post('/ModifyUser',ModifyUser);

// 查询使用用户名用户
router.post('/Grabble',Grabble);

//删除用户
router.delete('/remove',remove)


//添加房屋
router.post('/HouseSignup',HouseSignup);

//获取房屋列表
router.get('/HouseList',HouseList)

//删除房屋
router.delete('/removeHouse',removeHouse)

//搜索房屋
router.post('/GrabbleHouse',GrabbleHouse);

//修改用户
router.post('/ModifyHouse',ModifyHouse);

//ID查找单个用户
router.put('/ListOneHouse',ListOneHouse);


//添加评论
router.post('/CommentSignup',CommentSignup);

//获取评论列表
router.get('/CommentList',CommentList)

//搜索评论
router.post('/GrabbleComment',GrabbleComment);

//删除评论
router.delete('/removeComment',removeComment)

//ID查找单个用户
router.put('/ListOneComment',ListOneComment);

//获取CPU剩余内存
router.get('/getCPU',getCPU)

//获取销售房屋列表
router.get('/SellList',SellList)

//添加销售房屋
router.post('/SellSignup',SellSignup);

//删除销售房屋
router.delete('/removeSell',removeSell)

//搜索销售房屋
router.post('/GrabbleSell',GrabbleSell);

//ID查找单个销售房屋
router.put('/ListOneSell',ListOneSell);


module.exports = router;